/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.ts.manager;

import java.util.Collection;
import java.util.List;

import com.xy.biz.ts.domain.bo.TrainUserBO;
import com.xy.biz.ts.domain.query.TrainUserQuery;

/**
 *
 *
 * @author wwj
 * @date 2021-4-1
 */
public interface TrainUserManager {

	/**
	 * 保存
	 *
	 * @param trainUserBO
	 */
	int saveTrainUser(TrainUserBO trainUserBO);

	/**
	 * 保存多个
	 *
	 * @param collection
	 */
	int saveAllTrainUser(Collection<TrainUserBO> collection);

	/**
	 * 更新
	 *
	 * @param trainUserBO
	 */
	int updateTrainUser(TrainUserBO trainUserBO);

	/**
	 * 更新
	 *
	 * @param trainUserBO
	 */
	int updateTrainUserReleaseFlag(TrainUserBO trainUserBO);

	/**
	 * 删除
	 *
	 * @param trainUserId
	 */
	int deleteTrainUser(Long trainUserId);

	/**
	 * 查找一个
	 *
	 * @param trainUserId
	 * @return
	 */
	TrainUserBO getTrainUser(Long trainUserId);

	/**
	 * 查找多个
	 *
	 * @param collection 标识集合
	 */
	List<TrainUserBO> listTrainUserById(Collection<Long> collection);

	/**
	 * 查找多个
	 *
	 * @param query 查找条件
	 */
	List<TrainUserBO> listTrainUser(TrainUserQuery query);

	/**
	 * 查找多个
	 *
	 * @param query 查找条件
	 */
	List<TrainUserBO> listTrainUserFilterByUserId(TrainUserQuery query);

	/**
	 * 统计个数
	 *
	 * @param query 查找条件
	 */
	int countTrainUser(TrainUserQuery query);

    void deleteTrainUserByTrainId(Long trainId);
}
